//创建一个路由器，并暴漏出去
import { createRouter, createWebHashHistory } from "vue-router";
import UserLogin from "../views/UserLogin.vue";
import UserRegister from "@/views/UserRegister.vue";
import DubRoleList from "@/views/DubRoleList.vue";
import TextToSpeech from "@/views/TextToSpeech.vue";
import DubClone from "@/views/DubClone.vue";
import IndexPage from '@/views/IndexPage.vue'
  const router = createRouter({
    history: createWebHashHistory(),
    routes: [
      { path: "/", component: IndexPage,children:
        [
          { path: "dubRoleList", component: DubRoleList },
          { path: "textToSpeech", component: TextToSpeech },
          { path: "dubClone", component: DubClone },
          {
            path: "",
            component: DubRoleList
        }
        ] },

        { path: "/login", component: UserLogin },
        { path: "/register", component: UserRegister } 

        
        
    ]
})
export default router